var querystring = window.location.querystring;
var searchValue = getUrlVars()["search"];
console.log(searchValue);
$.getJSON('../search/' + searchValue, function(data) {
    console.log(data);
    var email  = "";
    $.each(data.emails, function(key,val) {
        email = email + "<a href=?page=profile&id=" + data.ids[key] + ">" + val + "</a><br />";

    });
    $('#result').html(email);
});